package com.szjz.freequery.configuration;

import com.szjz.freequery.FQList;
import com.szjz.freequery.FQObj;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * author:szjz
 * date:2019/11/14
 */

@Configuration
@ConditionalOnClass(value = {FQList.class, FQObj.class})
@EnableConfigurationProperties(value = FQProperties.class)
public class FQAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public FQList fqList(){
        return new FQList();
    }

    @Bean
    @ConditionalOnMissingBean
    public FQObj fqObj(){
        return new FQObj();
    }
}
